<!--
 * @Description: 事件机制
 * @Author: zzj
 * @Date: 2021-09-26 10:04:04
 * @LastEditors: zzj
 * @LastEditTime: 2021-09-26 15:03:30
-->
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>事件机制</title>
	<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.9/vue.js"></script>
</head>
<body>
	<div id="app">
		 <form v-on:submit.prevent="handler">   <!--组织网页刷新 -->
			<input type="text">
			<input type="submit">
		</form>
	</div>

	<script>
		new Vue({
			el:"#app",
			data:{

			},
			methods:{
				handler(){
					alert(1);
				}
			}
		})
	</script>
</body>
</html>